react 用 axios 打 localhost api server 出現 ERR_NETWORK 錯誤


將 express server 加上 cors 就好囉

npm install cors
import cors from 'cors';
app.use(cors({credentials:true}));
#React #Express #nodejs #cors #Axios






你可能感興趣的文章

C# 預設輸入對話框

C# 預設輸入對話框

Jest 自己的程式自己測試

Jest 自己的程式自己測試

關於 Shell Script

關於 Shell Script






留言討論